.container {
  height: 200px;
  background-color: aqua;
  padding: 0.1px;
}
.box_1 {
  height: 100px;
  margin-top: 0;
  background-color: lightskyblue;
  animation: margin-top 5s infinite;
}

@keyframes margin-top {
  50% {
    margin-top: 50px;
  }
}